<?php
/* @var $this ServiceController */
/* @var $model Service */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'service-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

  <?
    $this->widget('zii.widgets.jui.CJuiTabs', array(
      'tabs'=>array(
        'English' =>$this->renderPartial('_formDetail', array('model' => $model, 'form' => $form, 'language' => 'en'), $this),
        'Thai'=>$this->renderPartial('_formDetail', array('model' => $model, 'form' => $form, 'language' => 'th'), $this),
      )
    ));
  ?>  

  <?php if ($model->thumbnail_path) { ?>
    <?php echo CHtml::image(Yii::app()->request->baseUrl.$model->thumbnail_path);?>
  <?php } ?>

  <div class="row">
  <?php echo $form->labelEx($model,'thumbnail_path'); ?>
  <?php echo $form->fileField($model, 'thumbnail_path');?>
  <?php echo $form->error($model,'thumbnail_path'); ?>  
  
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->